package com.aisile.admin.jobs;

import com.aisile.admin.feign.WemediaFeign;
import com.aisile.admin.service.WemediaNewsAutoScanService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;

/**
 * @Auther:yry
 * @Date:2024/1/11 0011
 * @VERSON:1.0
 */
@Component
public class WemediaAutoScanJob {

    @Autowired
    private WemediaFeign wemediaFeign;

    @Autowired
    private WemediaNewsAutoScanService wemediaNewsAutoScanService;

    @XxlJob("wemediaAutoScanJob")
    public ReturnT<String> hello(String param){
//        List<Integer> ids =  wemediaFeign.findRelease();
//        for (Integer id:ids){
//            wemediaNewsAutoScanService.autoScanByWemediaNewsId(id);
//        }
        System.out.println(param+":"+new Date()+":进入了自动审核方法！JOBS");
        return ReturnT.SUCCESS;
    }

}
